package com.ibm.ems.servlets;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ibm.ems.dto.EventBean;

/**
 * Servlet implementation class EventModifyServlet
 */
public class EventModifyServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public EventModifyServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		EventBean p=new EventBean();
		
		RequestDispatcher rd=request.getRequestDispatcher("/EventModify.jsp");	
		p.setEventId(request.getParameter("eventId"));	
		p.setEventName(request.getParameter("eventName"));
		//p.setStartDate(request.getParameter("startDate"));
		//p.setEventId(request.getParameter("endDate"));
		p.setFees(Integer.parseInt(request.getParameter("fees")));
		p.setClassSize(Integer.parseInt(request.getParameter("classSize")));
		//p.setLocationBean(request.getParameter("locationId"));
		//p.setEventId(request.getParameter("proId"));
		//p.setEventId(request.getParameter("SpearkerName"));
		
			
		
		request.setAttribute("i",p );
			rd.forward(request,response);
			
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

}
